package com.mervin.patterns.bridge;

/***************************************
 * @Auther: mervin
 * @Date: 2020-04-21 00:40
 * @Description:
 ***************************************/
public class Client {

    public static void main(String[] args) {

        // 获取折叠式小米手机（样式 + 品牌）
        Phone foldeXiaoMiPhone = new FoldePhone(new XiaoMi());
        foldeXiaoMiPhone.open();
        foldeXiaoMiPhone.call();
        foldeXiaoMiPhone.close();

        System.out.println("=================");
        // 获取折叠式Vivo手机（样式 + 品牌）
        Phone foldeVivoPhone = new FoldePhone(new Vivo());
        foldeVivoPhone.open();
        foldeVivoPhone.call();
        foldeVivoPhone.close();

        System.out.println("=================");
        // 后续增加样式手机，只需要增加样式即可，不管有多少个品牌
        Phone upRightPhone = new UpRightPhone(new XiaoMi());
        upRightPhone.open();
        upRightPhone.call();
        upRightPhone.close();
    }
}
